* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* overflow: hidden; */
}

.main {
    height: 600px;
    width: 600px;
    border-radius: 4px;
    margin: 30px auto;
    transform: translateY(-6px);
    box-shadow: 0 26px 40px -24px rgba(0, 36, 100, .5);
    position: relative;
    display: flex;
    flex-direction: column;
}

/**
	  使用CSS自定义样式
	*/
/*定义了滚动条整体样式；*/
::-webkit-scrollbar {
    height: 10px !important;
    width: 10px !important;
}

/*定义了滚动条滑块的样式*/
::-webkit-scrollbar-thumb {
    border-radius: 0;
    border-style: dashed;
    background-color: #f6bf4e;
    border-color: #e2242400;
    border-width: 1.5px;
    background-clip: padding-box;
}

/*定义了轨道的样式*/

::-webkit-scrollbar-track {
    /*滚动条里面轨道*/
    -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    background: white;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(157, 165, 183, 0.7)
}

.message-box {
    height: 450px;
    border: 4px solid #6adfb9;
    box-sizing: border-box;
    overflow: hidden;
    
}

.message-window {
    overflow: scroll;
    height: 395px;
    overflow-x: hidden;
    position: relative;

}

.time {
    font-size: smaller;
}

.header {
    padding: 10px;
    border: 1px solid #d6e9c6;
    color: #3c763d;
    border-radius: 3px;
    background-color: #a1f9a9;
    text-align: center;
}

.message {
    padding: 10px;
    border: 1px solid #d6e9c6;
    width: 570px;
    margin-top: 8px;
    margin-bottom: 5px;
    margin-right: 5px;
    float: left;
    clear: both;
    border-radius: 4px;
    color: #3c763d;
    background-color: #dff0d8;
    animation-name: appear;
    animation-duration: 0.3s;
    box-shadow: 3px 3px 2px rgba(0, 0, 0, .3);
}

.my-message {
    padding: 10px;
    border: 1px solid #f1e1bf;
    width: 570px;
    margin-top: 8px;
    margin-bottom: 5px;
    margin-right: 5px;
    float: left;
    clear: both;
    border-radius: 4px;
    color: #f6bf4e;
    background-color: #fdebc7;
    animation-name: appear;
    animation-duration: 0.3s;
    box-shadow: 3px 3px 2px rgba(0, 0, 0, .3);
}

@keyframes appear {
    from {
        margin-top: 20px;
        background-color: white;
    }

    /* to动画的结束位置 也可以使用100%*/
    to {
        background-color: #dff0d8;
        margin-top: 8px;
    }
}

.input-box {
    height: 150px;
    background-color: #f9f166;
    position: relative;
}

#text {
    width: 590px;
    height: 140px;
    border: 5px solid #f6bf4e;
    margin: 5px 5px;

}

#text:focus {
    outline: none;
}

.send,
#type {
    position: absolute;
    cursor: pointer;
    right: 15px;
    bottom: 15px;
    background-color: #fa928e;
    border: 0px;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(0, 0, 0, .3);
    width: 80px;
    height: 30px;
    color: rgba(245, 212, 212, 0.8);
}

#type {
    right: 120px;
    text-align: center;
    outline: none;
}